//
//  YYECourseCollectionViewCell.m
//  YuYingEDU
//
//  Created by 胡波 on 2017/12/29.
//  Copyright © 2017年 胡波. All rights reserved.
//

#import "YYECourseCollectionViewCell.h"

@interface YYECourseCollectionViewCell ()


@end

@implementation YYECourseCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame {
    
    if (self = [super initWithFrame:frame]) {
        
        self.nameLabel = [[UILabel alloc]init];
        self.nameLabel.textColor = [UIColor blackColor];
        self.nameLabel.font = [UIFont systemFontOfSize:12];
        self.nameLabel.textAlignment = NSTextAlignmentCenter;
        self.nameLabel.layer.borderColor = [UIColor colorWithRed:217.0/255 green:217.0/255 blue:217.0/255 alpha:1].CGColor;
        self.nameLabel.layer.borderWidth = 1;
        self.nameLabel.layer.cornerRadius = 15;
        self.nameLabel.layer.masksToBounds = YES;
        [self.contentView addSubview:self.nameLabel];
//        self.nameLabel.backgroundColor = [UIColor redColor ];
        self.nameLabel.text = @"UI设计";
        
    }
    return self;
    
}

- (void)layoutSubviews {
    [super layoutSubviews];
    
    [self.nameLabel makeConstraints:^(MASConstraintMaker *make) {
        make.edges.equalTo(UIEdgeInsetsMake(9, 4, 9, 4));
    }];
    
}

- (void)setModel:(YYECourseLeftModel *)model {
    _model = model;
    
    self.nameLabel.text = model.CateName;
    
}

@end
